﻿using System;

namespace Week2_work2
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] arr = new int[10] { 3, 5, 6, 9, 4, 8, 7, 1, 2, 0 };
            int sum = 0;
            int ave = 0;
            Array.Sort(arr);
            Console.WriteLine("数组最大值："+arr[(arr.Length)-1]);
            Console.WriteLine("数组最小值："+arr[0]);
            
            for (int i = 0; i < arr.Length; i++) {
                sum += arr[i];
            }
            Console.WriteLine("数组全部值："+sum);
            ave = sum / arr.Length;
            Console.WriteLine("数组平均值："+ave);
        }
    }
}
